package com.loong.user.common.backend.param;

import com.loong.common.validator.group.CommonInsert;
import com.loong.common.validator.group.CommonUpdate;
import lombok.*;

import javax.persistence.Column;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @Description: 角色分配资源
 * @Author: hzp
 * @Date: 2020-10-19 9:16
 */
@Data
@ToString
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ManageUserRoleAuthParam {
    //其实id 可以去掉不用也可以
    @NotNull(groups = {CommonUpdate.class},message = "id不能为空")
    private Long id;
    /**
     * 角色id
     */
    @NotNull(groups  ={CommonInsert.class},message = "角色id不能为空")
    private Long roleId;

    /**
     * 资源id
     */
//    @NotNull(groups  ={CommonInsert.class},message = "资源id不能为空")
//    private Long resourceId;

    /**
     * 授权资源集合ids
     */
    @NotEmpty(groups  ={CommonInsert.class},message = "资源集合不能为空")
    List<Long> resourceIds;
}
